from apis.crud.bulk import DataSentence
from apis.crud.sqlmanager import SqlManager


class SqlOperate:
    def __init__(self, tablename):
        self.tablename = tablename

    def dql(self, *args):
        sentence = DataSentence(tablename=self.tablename, keywords=args).select()
        return SqlManager(sentence).query()

    def total(self):
        sentence = DataSentence(tablename=self.tablename).count()
        return SqlManager(sentence).query()

    def dml(self):
        pass
